﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<title>setTimeout</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body onload="countDown(5);">
	<h2>登入信息已丢失,<span id="jumpTo">5</span>秒后自动跳转到登入页面</h2>
	<script type="text/javascript">
		function countDown(secs) {
			var jumpTo = document.getElementById('jumpTo');
			jumpTo.innerHTML = secs;
			if (--secs > 0) {
				setTimeout("countDown(" + secs + ")", 1000);
			} else {
				if(parent){
					parent.location.href="<%=basePath %>index";
				}else{
					location.href="<%=basePath %>index";
				}
			}
		}
	</script>
</body>
</html>